package com.github.permissiondog.cancanpandroid.repository.api;

import com.github.permissiondog.cancanpandroid.repository.api.request.ApproveApplicationRequest;
import com.github.permissiondog.cancanpandroid.repository.api.request.ConfirmApplicationRequest;
import com.github.permissiondog.cancanpandroid.repository.api.request.CreateApplicationRequest;
import com.github.permissiondog.cancanpandroid.repository.api.response.ApplicationInfoResponse;
import com.github.permissiondog.cancanpandroid.repository.api.response.ApplicationResponse;
import com.github.permissiondog.cancanpandroid.repository.api.response.ApplicationsResponse;
import com.github.permissiondog.cancanpandroid.repository.api.response.BaseResponse;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApplicationApiService {
    @GET("applicant/application")
    Call<ApplicationsResponse> getApplicantApplications();
    @GET("approver/application")
    Call<ApplicationsResponse> getApproverApplications();
    @GET("applicationInfo")
    Call<ApplicationInfoResponse> getApplicationInfo(@Query("applicationId") int applicationId);
    @POST("applicant/application")
    Call<ApplicationResponse> createApplication(@Body CreateApplicationRequest request);
    @POST("approver/application")
    Call<BaseResponse> approveApplication(@Body ApproveApplicationRequest request);
    @POST("applicant/application/confirm")
    Call<BaseResponse> confirmApplication(@Body ConfirmApplicationRequest request);
}
